package visitor;


public class Main {
	
	public static void main(String[] args) {
		GroupClient gc = new GroupClient("M1APP");
		Client c = new Client("Momo");
		Client c2 = new Client("Flo");
		Commande co = new Commande("ls -l","ligne 1");
		
		c.addCommande(co);
		c.addCommande(new Commande("rm -Rf", "ligne 34"));
		c2.addCommande(new Commande("grep -v test","ligne 34"));
		
		
		gc.addClient(c);
		gc.addClient(c2);
		
		GroupClient gc2 = new GroupClient("Disney");
		Client c3 = new Client("David");
		c3.addCommande(new Commande("whois www.google.com"));
		gc2.addClient(c3);
		
		IVisitor iv = new RapportCommandes();
		gc2.accept(iv);
		gc.accept(iv);
		
		
		iv.afficherCommandes();
	}
	
}
